package io;

import java.io.*;

public class OOSDemo {
    public static void main(String[] args) throws IOException {
        String name = "李明";
        int age = 18;
        String gender = "不明";
        String[] otherInfo = {"眼睛小", "黑", "嗓门大", "王克晶老师是我们的启蒙老师"};
        Person person = new Person(otherInfo,age, gender,name);
        System.out.println(person);
        FileOutputStream fos = new FileOutputStream("person.obj");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(person);
        System.out.println("保存输出完毕");
        oos.close();
    }
}
